package com.alex.megacj.affiliate;

import java.util.regex.Pattern;

import org.springframework.beans.factory.annotation.Required;

public class RewriteRule {

	private String host;

	private Pattern pattern;

	private String affiliateId;

	public String getHost() {
		return host;
	}

	@Required
	public void setHost(String host) {
		this.host = host;
	}

	public void setPattern(String pattern) {
		this.pattern = Pattern.compile(pattern);
	}

	public void setAffiliateId(String affiliateId) {
		this.affiliateId = affiliateId;
	}

	public Pattern getPattern() {
		return pattern;
	}

	public void setPattern(Pattern pattern) {
		this.pattern = pattern;
	}

	public String getAffiliateId() {
		return affiliateId;
	}
}
